package com.config;

import com.entity.Students;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
@ComponentScan(basePackages = "com") //扫描带注解的包
@EnableAspectJAutoProxy  //开启aspectJ注解

public class MySpringConfiguration {

    @Bean("s1")
    public Students initStudents(){
        return new Students("S0001","张三丰","男","太极拳");
    }
}
